<%--
  Created by IntelliJ IDEA.
  User: SamZhao
  Date: 2016/12/6
  Time: 19:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ include file="/WEB-INF/jsp/include.inc.jsp"%>
<script src="/js/jquery-1.8.3.min.js" ></script>

<!-- BEGIN MAIN CONTENT -->
<section id="main-content">
    <!-- BEGIN WRAPPER  -->
    <section class="wrapper">
        <!-- BEGIN ROW  -->
        <div class="row">
            <div class="col-lg-12" style="width: 800px;">
                <section class="panel">
                    <header class="panel-heading">
                        <span class="label label-primary">书籍变更</span>
                        <span class="tools pull-right">
                           <a href="javascript:;" class="fa fa-chevron-down"></a>
                           <a href="javascript:;" class="fa fa-times"></a>
                           </span>
                    </header>
                    <div class="panel-body">

                        <div class=" form">
                            <form class="cmxform form-horizontal tasi-form" id="commentForm" method="get" action="/book/saveBook.html">
                                <div class="form-group ">
                                    <label for="realname" class="control-label col-lg-2">姓名</label>
                                    <div class="col-lg-10">
                                        <input class=" form-control" id="realname" name="realname"  type="text" readonly value="${user.realname}"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="number" class="control-label col-lg-2">编号</label>
                                    <div class="col-lg-10">
                                        <input class=" form-control" id="number" name="number"  type="text" readonly value="${user.number}"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="sex1" class="control-label col-lg-2">性别</label>
                                    <div class="col-lg-10">
                                        <select class="form-control m-bot15" id="sex1" readonly="readonly">
                                            <option value="0" <c:if test="${user.sex == '0'}">selected</c:if>>男</option>
                                            <option value="1" <c:if test="${user.sex == '1'}">selected</c:if>>女</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="telephone" class="control-label col-lg-2">电话</label>
                                    <div class="col-lg-10">
                                        <input class="form-control " id="telephone" type="text" name="telephone" readonly value="${user.telephone}"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="role" class="control-label col-lg-2">职位</label>
                                    <div class="col-lg-10">
                                        <select class="form-control m-bot15" id="role" readonly="readonly">
                                            <c:forEach items="${rollist }" var="item">
                                                <option value="${item.id}" <c:if test="${item.id == user.roleId}">selected</c:if>>${item.roleMemo}</option>
                                            </c:forEach>
                                        </select>

                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="department" class="control-label col-lg-2">所属部门</label>
                                    <div class="col-lg-10">
                                        <select class="form-control m-bot15" id="department" readonly="readonly">
                                            <c:forEach items="${deplist }" var="item">
                                                <option value="${item.id}" <c:if test="${item.id == user.departmentId}">selected</c:if>>${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="nursestation" class="control-label col-lg-2">所属护士站</label>
                                    <div class="col-lg-10">
                                        <select class="form-control m-bot15" id="nursestation" readonly="readonly">
                                            <c:forEach items="${nulist }" var="item">
                                                <option value="${item.id}" <c:if test="${item.id == user.nursestationId}">selected</c:if>>${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-lg-offset-2 col-lg-10">
                                        <button class="btn btn-primary" type="button" id="saveBtn">确定</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </section>
            </div>
        </div>
        <!-- END ROW  -->
    </section>
</section>
<script type="text/javascript">

    $(function(){
        // save
        $("#saveBtn").on('click', function() {
            window.location = "/user/list.html";
        });

    });

</script>
